import * as types from './mutation-types'

const mutations = {
  [types.SET_LOCATION](state, location) {
    state.location = location
  },
  [types.SET_HISTORY_LOCATION](state, newLocation) {
    state.historyLocation.push(newLocation)
  },
  [types.SET_TITLE](state, title) {
    state.title = title
  },
  [types.SET_ADD_NEW_MEMBER](state, newLo) {
    state.addNewMember = newLo
  },
  [types.SET_ADD_SHOW](state, newVal) {
    state.addShow = newVal
  },
  [types.SET_NEW_MSG_NUM](state, newVal) {
    state.newMsgNum = newVal
  },
  [types.SET_MSG_TITLE](state, newVal) {
    state.msgTitle = newVal
  },
  [types.SET_BACK_SHOW](state, newVal) {
    state.backShow = newVal
  }
}

export default mutations
